authApp.value('page', 'material_apply_auth'); 
authApp.controller("fillApplyController",function($scope,$http,$location,$getQueryString,Upload, $timeout,$sce,$cookieStore,$cookies){
	
	$scope.isUpload=true;
	
	$scope.Fid=$getQueryString("pid");	
	$scope.state=$getQueryString("state");	
	$scope.schoolId=$getQueryString("schoolId");
	if($scope.state=="1"){
		$scope.isUpload=false;
	}	
	
	$scope.getJudgeList=function(){
		$http({
			method:'get',
			url:apis.queryItemInfoByFid1,
			params:{'pid1':$getQueryString("pid"),'schoolId':$scope.schoolId},
		}).success(function(response){
			if(response.code=="000000"){
				$scope.judeAllList=response.data.list;
			}else{
				alert(response.errorMsg);
			}
		}).error(function(){
			alert("服务器打瞌睡了，请稍等！");
		})
	}
	
	$scope.getJudgeList();
	
	$scope.turnToApply=function(pid){
		location.href="material_applyauth.html?pid="+pid+"&schoolId="+$scope.schoolId+"&Fid="+$scope.Fid+"&state="+$scope.state;
	}
	
	
})